<template>
<div style="padding:100px;" v-html="noticeContent"></div>
</template>

<script>
import API from '../api/api_home'
export default {
  name: 'PageIndex',
  data () {
    return {
      noticeContent: ''
    }
  },
  mounted () {
    var that = this
    API.home().then(function (result) {
      if (result) {
        that.noticeContent = result.data.announcement
      } else {
        that.$q.notify({
          message: result.msg,
          type: 'negative'
        })
      }
    }, function (err) {
      that.$q.notify({
        message: err.response.data.msg,
        type: 'negative'
      })
    // eslint-disable-next-line handle-callback-err
    }).catch(function (error) {
      that.$q.notify({
        message: '请求出现异常',
        type: 'negative'
      })
    })
  }
}
</script>
